{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin static %}
{% load ballot_icon %}
{% load ietf_filters person_filters %}
{% block pagehead %}
    <link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
{% endblock %}
{% block title %}Documents on recent agendas{% endblock %}
{% block content %}
    {% origin %}
    <h1>
        Documents on recent agendas
        <br>
        <small class="text-body-secondary">in states
            {% for state in states %}
                {{ state.name }}{% if not forloop.last %},{% endif %}
            {% endfor %}
        </small>
    </h1>
    {% include "iesg/nav.html" with active="past_documents" %}
    <table class="table table-sm table-striped tablesorter">
        <thead>
            <tr>
                <th scope="col" data-sort="doc">Document</th>
                <th scope="col" class="d-none d-sm-table-cell" data-sort="date">Telechat Date</th>
                <th scope="col" data-sort="status">Status</th>
                <th scope="col" class="d-none d-sm-table-cell" data-sort="ad">Responsible AD</th>
                <th scope="col" data-sort="discusses">Discusses</th>
            </tr>
        </thead>
        {% if docs %}
            <tbody>
                {% for doc in docs %}
                    <tr class="{% if doc.by_me %}
                                   byme
                               {% endif %}

                               {% if doc.for_me %}
                                   forme
                               {% endif %}">
                        <td>
                            {{ doc.displayname_with_link }}
                            <br>
                            <span class="fw-bold">{{ doc.title }}</span>
                        </td>
                        <td class="d-none d-sm-table-cell">{{ doc.telechat }}</td>
                        {% include "doc/search/status_columns.html" %}
                        <td class="d-none d-sm-table-cell">{% person_link doc.ad %}</td>
                        <td>
                            {% for p in doc.blocking_positions %}
                                {% if p.is_old_pos %}<span class="text-body-secondary">{% endif %}
                                {% person_link p.balloter %}
                                ({% if p.discuss_time %}{{ p.discuss_time|timesince_days }} days ago{% endif %}{% if doc.get_state_url != "rfc" and p.rev != doc.rev %} for -{{ p.rev }}{% endif %})
                                <br>
                                {% if p.is_old_pos %}</span>{% endif %}
                            {% endfor %}
                        </td>
                    </tr>
                {% endfor %}
            </tbody>
        {% endif %}
    </table>
{% endblock %}
{% block js %}
    <script src="{% static "ietf/js/list.js" %}"></script>
{% endblock %}
